package socialnetworks;

import grafi.Arco;

import java.io.IOException;
import java.util.Iterator;
import java.util.List;

import com.google.gdata.util.ServiceException;

public class TestGrafoYouTubeCasella 
{	public static void main(String[] args) throws ServiceException, IOException
	{	YouTubeDataExtractor extr=new YouTubeDataExtractor();
		List<String> seedIds=extr.query("android");
		
		GrafoYouTube g=new GrafoYouTube(50,seedIds);
		
		Iterator<Arco> it=g.archi();
		while(it.hasNext())
			System.out.println(it.next());
		for(int i=0;i<50;i++)
		{	String id=g.id(i);
			if(id.startsWith("VID::"))
				System.out.println(extr.titolo(id.substring(5)));
		}
	}
}
